package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.dto.SetmealPageQueryDTO;
import com.sky.entity.Setmeal;
import com.sky.enumeration.OperationType;
import com.sky.vo.DishItemVO;
import com.sky.vo.SetmealVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.HashMap;
import java.util.List;

/*套餐Mapper接口*/
@Mapper
public interface SetmealMapper {
    public Integer countByCategoryId(Long categoryId);

    @AutoFill(OperationType.INSERT)
    public void insert(Setmeal setmeal);

    public Page<SetmealVO> pageQuery(SetmealPageQueryDTO setmealPageQueryDTO);

    public Setmeal getById(Long id);


    public void deleteById(Long id);

    @AutoFill(OperationType.UPDATE)
    public void update(Setmeal setmeal);

    public List<Setmeal> list(Setmeal setmeal);

    public List<DishItemVO> getDishItemBySetmealId(Long id);

    public Integer countByMap(HashMap<Object, Object> conditionMap);
}
